var SearchForm = function () {
  var template = /* html */ `
    <div class="search-form">
      <el-form inline label-width="auto">
        <el-form-item label="审批类型">
          <el-select clearable v-model="search.type" class="search-input">
            <el-option v-for="typeObj in typeList" :key="typeObj.value" :value="typeObj.value" :label="typeObj.label">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="部门">
          <el-select clearable filterable v-model="search.deptId" class="search-input">
            <el-option v-for="dept in deptList" :key="dept.id" :value="dept.id" :label="dept.name">
            </el-option>
          </el-select>
        </el-form-item>
      </el-form>
    </div>
  `;

  return {
    props: {
      search: {
        type: Object,
        required: true
      },
      deptList: {
        type: Array,
        default: function () {
          return [];
        }
      }
    },

    data: function () {
      return {
        typeList: i18n.getDropDown('attendance.approvalSetting.type', [1, 2, 3])
      };
    },

    template: template
  };
}();
